unit Class_UTAX;

interface
uses
  Classes,SysUtils;

type
  TUTAX=class(TObject)
  private
    FTAXLEVEL:Integer;
    FStartVal:Extended;
    FRightVal:Extended;
    FRATLEVEL:Extended;
    FDDUCTVAL:Extended;
  published
    property TAXLEVEL:Integer  read FTAXLEVEL write FTAXLEVEL;
    property StartVal:Extended read FStartVal write FStartVal;
    property RightVal:Extended read FRightVal write FRightVal;
    property RATLEVEL:Extended read FRATLEVEL write FRATLEVEL;
    property DDUCTVAL:Extended read FDDUCTVAL write FDDUCTVAL;
  public
    procedure Initialize(ATAXLEVEL:Integer;AStartVal,ARightVal,ARATLEVEL,ADDUCTVAL:Extended);overload;
  public
    class procedure Initialize(var AList:TStringList);overload;
  end;

  





implementation

{ TUTAX }

class procedure TUTAX.Initialize(var AList: TStringList);
var
  UTAX:TUTAX;
begin
  if AList=nil then Exit;

  UTAX:=TUTAX.Create;
  UTAX.Initialize(1,0,1500,3,0);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);

  UTAX:=TUTAX.Create;
  UTAX.Initialize(2,1500,4500,10,105);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);

  UTAX:=TUTAX.Create;
  UTAX.Initialize(3,4500,9000,20,555);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);

  UTAX:=TUTAX.Create;
  UTAX.Initialize(4,9000,35000,25,1005);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);

  UTAX:=TUTAX.Create;
  UTAX.Initialize(5,35000,55000,30,2755);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);

  UTAX:=TUTAX.Create;
  UTAX.Initialize(6,55000,80000,35,5505);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);

  UTAX:=TUTAX.Create;
  UTAX.Initialize(7,80000,-1,45,13505);
  AList.AddObject(Format('%D',[UTAX.TAXLEVEL]),UTAX);            
end;

procedure TUTAX.Initialize(ATAXLEVEL: Integer; AStartVal, ARightVal,
  ARATLEVEL, ADDUCTVAL: Extended);
begin
  FTAXLEVEL:=ATAXLEVEL;
  FStartVal:=AStartVal;
  FRightVal:=ARightVal;
  FRATLEVEL:=ARATLEVEL;
  FDDUCTVAL:=ADDUCTVAL;
end;

end.
